package com.zprmb.udzt;

import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.RelativeLayout;

public class Userinfo_success extends BaseActivity implements OnClickListener {
	private ImageView img_back;
	private Button btn_confirm;
	private RelativeLayout rl_back;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.userinfo_success);
		img_back = (ImageView) findViewById(R.id.img_back);
		btn_confirm = (Button) findViewById(R.id.btn_confirm);
		rl_back = (RelativeLayout) findViewById(R.id.rl_back);
		rl_back.setOnClickListener(this);
		btn_confirm.setOnClickListener(this);
		img_back.setOnClickListener(this);
		BbtApplication.getInstance().addActvity(this);
	}

	@Override
	protected void onDestroy() {
		// TODO Auto-generated method stub
		super.onDestroy();
		BbtApplication.getInstance().removeActvity(this);
	}

	public boolean onKeyDown(int keyCode, KeyEvent event) {
		if (keyCode == KeyEvent.KEYCODE_BACK) {

			Intent mIntent = new Intent();
			mIntent.setAction("exit");
			sendBroadcast(mIntent);
			finish();
			return super.onKeyDown(keyCode, event);

		}
		return super.onKeyDown(keyCode, event);
	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
		case R.id.img_back:
			Intent mIntent = new Intent();
			mIntent.setAction("exit");
			sendBroadcast(mIntent);
			finish();
			break;
		case R.id.btn_confirm:
			Intent intent2 = new Intent(Userinfo_success.this,
					V4AddMoneySActiviy.class);
			startActivity(intent2);
			break;
		case R.id.rl_back:
			finish();
			break;
		}
	}

}
